package com.template;

import lombok.extern.slf4j.Slf4j;

/**
 * @author mayixiang
 * @date 2021-02-19 9:37
 */
@Slf4j
public abstract class AbstractHandler {

    protected final StateMachine stateMachine;
    protected final ProcessTask processTask;

    protected AbstractHandler(StateMachine stateMachine, ProcessTask processTask){
        this.stateMachine = stateMachine;
        this.processTask = processTask;
    }

    public String action(){
        log.info("开始");
        String executor = this.executor();
        System.out.println("结束");
        return executor;
    }

    public abstract String executor();

}
